package com.scenic.rd_android.testview;

import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.nova.scenic.projectlibs.widget.dialog.BaseDialogFragment;
import com.nova.scenic.projectlibs.widget.dialog.buildview.AdvanceDialogViewBuild;
import com.scenic.rd_android.R;

public class TestDialogFragment extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test_dialog_fragment);
    }

    @Override
    protected void onResume() {
        super.onResume();

        BaseDialogFragment dialogFragment = new BaseDialogFragment();
        dialogFragment.setViewBuilder(new AdvanceDialogViewBuild(dialogFragment,this));
        dialogFragment.setMessage("我的测试");
        dialogFragment.setTitle("我的标题");
        dialogFragment.setButton(DialogInterface.BUTTON_NEGATIVE, "确定", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {

            }
        });

        dialogFragment.setButton(DialogInterface.BUTTON_POSITIVE, "忽略", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {

            }
        });
        dialogFragment.show(this);
    }
}
